package com.dhcc.model;

import javax.persistence.*;

/**
 * Created by guorui on 2017/3/17.
 */
@Entity
@Table(name = "tb_kcdy_answer", schema = "test", catalog = "")
public class KcdyAnswer {
    private int ansId;
    private int userId;
    private int ansNo;
    private int queId;
    private String replyCon;
    private String replyTime;

    @Id
    @Column(name = "ans_id", nullable = false)
    public int getAnsId() {
        return ansId;
    }

    public void setAnsId(int ansId) {
        this.ansId = ansId;
    }

    @Basic
    @Column(name = "user_id", nullable = false)
    public int getUserId() {
        return userId;
    }

    public void setUserId(int userId) {
        this.userId = userId;
    }

    @Basic
    @Column(name = "ans_no", nullable = false)
    public int getAnsNo() {
        return ansNo;
    }

    public void setAnsNo(int ansNo) {
        this.ansNo = ansNo;
    }

    @Basic
    @Column(name = "que_id", nullable = false)
    public int getQueId() {
        return queId;
    }

    public void setQueId(int queId) {
        this.queId = queId;
    }

    @Basic
    @Column(name = "reply_con", nullable = false, length = 255)
    public String getReplyCon() {
        return replyCon;
    }

    public void setReplyCon(String replyCon) {
        this.replyCon = replyCon;
    }

    @Basic
    @Column(name = "reply_time", nullable = false, length = 20)
    public String getReplyTime() {
        return replyTime;
    }

    public void setReplyTime(String replyTime) {
        this.replyTime = replyTime;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        KcdyAnswer that = (KcdyAnswer) o;

        if (ansId != that.ansId) return false;
        if (userId != that.userId) return false;
        if (ansNo != that.ansNo) return false;
        if (queId != that.queId) return false;
        if (replyCon != null ? !replyCon.equals(that.replyCon) : that.replyCon != null) return false;
        if (replyTime != null ? !replyTime.equals(that.replyTime) : that.replyTime != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = ansId;
        result = 31 * result + userId;
        result = 31 * result + ansNo;
        result = 31 * result + queId;
        result = 31 * result + (replyCon != null ? replyCon.hashCode() : 0);
        result = 31 * result + (replyTime != null ? replyTime.hashCode() : 0);
        return result;
    }
}
